﻿using System;
using System.Data.SqlClient;
using System.Windows.Forms;
using Utilities;

namespace QuanLyKhachSan
{
    internal static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        private static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            ConfigHelper.Initiaties();
            SqlConnection con = ConfigHelper.GetConnection();
            try
            {
                con.Open();
                con.Close();
            }
            catch
            {
                var frmConfig = new frmCauHinh();
                frmConfig.ShowDialog();
            }

            var frm = new frmLogin();
            if (frm.ShowDialog() == DialogResult.OK)
            {
                Application.Run(new MainForms());
            }

        }
    }
}
